﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;

namespace GN.Pay.Client
{
    /// <summary>
    /// 由于晌应产生的异常
    /// </summary>
    [Serializable]
    public class ResponseException: Exception
    {
        /// <summary>
        /// 实例化 ResponseException
        /// </summary>
        /// <param name="statusCode"></param>
        /// <param name="message"></param>
        public ResponseException(HttpStatusCode statusCode, string message)
            : base(message)
        {
            this.StatusCode = statusCode;
        }

        /// <summary>
        /// 响应状态
        /// </summary>
        public HttpStatusCode StatusCode { get; private set; }
    }
}
